package com.jf.books.controller;

import com.jf.books.domain.Books;
import com.jf.books.service.IBookService;
import com.jf.common.core.controller.BaseController;
import com.jf.common.core.page.TableDataInfo;
import io.jsonwebtoken.lang.Classes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@RestController
@RequestMapping("/books/books")
public class BookController extends BaseController {
	@Autowired
	private IBookService bookService;

	/**
	 * 查询班级信息列表
	 */
	@PreAuthorize("@ss.hasPermi('books:books:list')")
	@GetMapping("/list")
	public TableDataInfo list()
	{
		startPage();
		List<Books> list = bookService.findAll();
		System.out.println("list = " + list);
		return getDataTable(list);
	}
}
